#ifndef SIMPLE_NODE_H
#define SIMPLE_NODE_H

#include "behaviortree_cpp/behavior_tree.h"
#include "behaviortree_cpp/bt_factory.h"  // 新增：包含BehaviorTreeFactory定义
#include "behaviortree_cpp/tree_node.h"   // 新增：包含TreeNode定义
#include "rclcpp/rclcpp.hpp"

class SimpleNode : public rclcpp::Node
{
  public:
    SimpleNode();
    std::shared_ptr<BT::Tree> getTree() { return tree_; }

  private:
    std::shared_ptr<BT::Tree> tree_;
    BT::BehaviorTreeFactory factory_;  // 改为值类型而非指针
};

#endif